From: Paul Donald Date: Fri, 17 Oct 2025 11:44:16 +0000 (+0200) Subject: luci-base: rename getLocaltime to getUnixtime X-Git-Url: http://git.openwrt.org/%22https:/collectd.org/%22http:/www.crowdsec.net//%22https%22/%22https:/collectd.org/%22http:/www.crowdsec.net/%22https%22?a=commitdiff_plain;h=54432996bb44fb97aa74cdacb9c9e623a679e56f;p=project%2Fluci.git luci-base: rename getLocaltime to getUnixtime There appear to be no consumers of getLocaltime. One instance of a callGetLocaltime uses the system info call whose localtime property uses tm->tm_gmtoff which is "Seconds East of UTC" i.e. a unixtime value with the timezone baked in to the value. Sometimes we actually want Unixtime. So rename to clarify what this function actually returns. Signed-off-by: Paul Donald --- diff --git a/modules/luci-base/root/usr/share/rpcd/ucode/luci b/modules/luci-base/root/usr/share/rpcd/ucode/luci index 458c6573c2..056db549c4 100644 --- a/modules/luci-base/root/usr/share/rpcd/ucode/luci +++ b/modules/luci-base/root/usr/share/rpcd/ucode/luci @@ -94,8 +94,9 @@ const methods = { } }, - getLocaltime: { + getUnixtime: { call: function(request) { + // time() ; Returns the current UNIX epoch. return { result: time() }; } },